package com.exigen.performance.test.webapp.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.primefaces.model.chart.PieChartModel;

import com.exigen.performance.test.webapp.domain.base.BaseEntity;

/**
 * Entity to represent dashboard data.
 * 
 * @author Maksim Savchuk
 * 
 */
@Entity
@Table(name = "PERF_DASHBOARD_PROJECTS")
public class DashboardEntity extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2942061499723290574L;
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE)
	@Column(name = "DASHBOARD_ELEMENT_ID")
	private Long id;
	@Column(name = "PROJECT_ID")
	private Long projectId;
	@Transient
	private String projectName;
	@Column(name = "OVERALL_COUNT")
	private Long overallCount;
	@Column(name = "EXECUTED_COUNT")
	private Long executedCount;
	@Column(name = "LAST_UPDATE")
	private Date lastUpdate;
	@Transient
	private PieChartModel pieChartData;

	public Long getOverallCount() {
		return overallCount;
	}

	public void setOverallCount(Long overallCount) {
		this.overallCount = overallCount;
	}

	public Long getExecutedCount() {
		return executedCount;
	}

	public void setExecutedCount(Long executedCount) {
		this.executedCount = executedCount;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public PieChartModel getPieChartData() {
		return pieChartData;
	}

	public void setPieChartData(PieChartModel pieChartData) {
		this.pieChartData = pieChartData;
	}

}
